<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$msg = '';

function filter_post(&$data) {
    $remove = array('#<[^>][0,]>#');

    foreach ($data as $key => $item) {
        $data[$key] = preg_replace($remove, '', $item);
    }
}

function validate($data, &$msg) {

    $map = array(
        'imie' => array('#[a-z\s]{3,}#i', 'Podaj Imię'),
        'email' => array('#[a-z0-9@\.\-_]{12,}#i', 'Podaj prawidłowy e-mail'),
        'telefon' => array('#[a-z0-9\s\.\-_]{7,}#i', 'Podaj telefon'),
        'tresc' => array('#[a-z0-9\s\.\-_]{50,}#i', 'Wpisz treść.inimum 50 naków. Podałeś ' . strlen($data['tresc'])
        )
    );

    $return = true;
    foreach ($data as $key => $item) {

        if (isset($map[$key])) {

            $pas = preg_match($map[$key][0], $item);

            if ($pas == 0) {
                $return = false;
                $msg = $msg . '<span>' . $map[$key][1] . '</span><br />';
            }
        }
    }
    if($msg=="")
        $msg = 'Mail został wyslany. Dziekujemy.';
    return $return;
}

$is_post = count($_POST) > 0 && isset($_POST['sendMail']);
$valid = 0;
if ($is_post) {

    filter_post($_POST);

    $valid = validate($_POST, $msg);
    if ($valid) {


        $headers[] = 'From: Konserwator - kontakt';

        $to = MAIL_TO;

        mail($to, 'Kontakt:' . $_POST['temat'], 'Użytkownik ' . $_POST['imie'] . ', emial: ' . $_POST['email'] . PHP_EOL .
                'Wpisał taką treść' . PHP_EOL . $_POST['tresc'] . str_repeat(PHP_EOL, 3) .
                'Data: ' . date('Y m d H:i:s ', time()) . ' ADRES IP:' . $_SERVER['REMOTE_ADDR'], implode("\r\n",$headers));
    }
}
?>
<?php if ($msg != "") { ?>
    <div class="info errors"><?php echo $msg; ?></div>
<? } ?>
<div class="kontakt_div">
    <div class="kontakt_wrap">
        <div>

            <div class="fl" id="kontakt_witget">

                <h1 class="page-title">Kontakt</h1>

                <div>
                    <?php echo $this->tresc['short'] ?>
                </div>
            </div>
            <div class="fl" id="kontakt_map">
                <div id="map_canvas2" class="mapmain fl" style="position: relative; background-color: rgb(229, 227, 223); overflow: hidden;"><div style="position: absolute; left: 0px; top: 0px; overflow: hidden; width: 100%; height: 100%; z-index: 0;"><div style="position: absolute; left: 0px; top: 0px; overflow: hidden; width: 100%; height: 100%; z-index: 0;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1; cursor: url(&quot;http://maps.gstatic.com/mapfiles/openhand_8_8.cur&quot;), default;"><div style="position: absolute; left: 0px; top: 0px; z-index: 200;"><div style="position: absolute; left: 0px; top: 0px; z-index: 101;"></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 201;"><div style="position: absolute; left: 0px; top: 0px; z-index: 102;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 38px; top: -20px;"><canvas style="position: absolute; left: 0px; top: 0px; height: 256px; width: 256px;" height="256" width="256"></canvas></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 294px; top: -20px;"><canvas style="position: absolute; left: 0px; top: 0px; height: 256px; width: 256px;" height="256" width="256"></canvas></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 38px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 38px; top: 236px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 294px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 294px; top: 236px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -218px; top: -20px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 550px; top: -20px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -218px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -218px; top: 236px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 550px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 550px; top: 236px;"></div></div></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 103;"><div style="position: absolute; left: 0px; top: 0px; z-index: -1;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 38px; top: -20px;"><canvas style="position: absolute; left: 0px; top: 0px; height: 256px; width: 256px;" height="256" width="256"></canvas></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 294px; top: -20px;"><canvas style="position: absolute; left: 0px; top: 0px; height: 256px; width: 256px;" height="256" width="256"></canvas></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 38px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 38px; top: 236px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 294px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 294px; top: 236px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -218px; top: -20px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 550px; top: -20px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -218px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: -218px; top: 236px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 550px; top: -276px;"></div><div style="width: 256px; height: 256px; overflow: hidden; position: absolute; left: 550px; top: 236px;"></div></div></div></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 202;"><div style="position: absolute; left: 0px; top: 0px; z-index: 104;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 105;"></div><div style="position: absolute; left: 0px; top: 0px; z-index: 106;"></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 100;"><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><div style="width: 256px; height: 256px; position: absolute; left: 38px; top: -20px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 294px; top: -20px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 38px; top: -276px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 38px; top: 236px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 294px; top: -276px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 294px; top: 236px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -218px; top: -20px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 550px; top: -20px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -218px; top: -276px;"></div><div style="width: 256px; height: 256px; position: absolute; left: -218px; top: 236px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 550px; top: -276px;"></div><div style="width: 256px; height: 256px; position: absolute; left: 550px; top: 236px;"></div></div></div></div><div style="position: absolute; z-index: 0; left: 0px; top: 0px;"><div style="overflow: hidden; width: 608px; height: 278px;"><img style="width: 608px; height: 278px;" src="http://maps.googleapis.com/maps/api/js/StaticMapService.GetMapImage?1m2&amp;1i35290&amp;2i21524&amp;2e1&amp;3u8&amp;4m2&amp;1u608&amp;2u278&amp;5m3&amp;1e0&amp;2b1&amp;5spl&amp;token=85070"></div></div><div style="position: absolute; left: 0px; top: 0px; z-index: 0;"><div style="position: absolute; left: 0px; top: 0px; z-index: 1;"><div style="width: 256px; height: 256px; position: absolute; left: 38px; top: -20px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt0.googleapis.com/vt?lyrs=m@205215310&amp;src=apiv3&amp;hl=pl&amp;x=138&amp;y=84&amp;z=8&amp;s=Ga&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 294px; top: -20px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt1.googleapis.com/vt?lyrs=m@205238432&amp;src=apiv3&amp;hl=pl&amp;x=139&amp;y=84&amp;z=8&amp;s=Galil&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 38px; top: -276px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt0.googleapis.com/vt?lyrs=m@205247081&amp;src=apiv3&amp;hl=pl&amp;x=138&amp;y=83&amp;z=8&amp;s=G&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 38px; top: 236px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt0.googleapis.com/vt?lyrs=m@205242341&amp;src=apiv3&amp;hl=pl&amp;x=138&amp;y=85&amp;z=8&amp;s=Gal&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 294px; top: -276px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt1.googleapis.com/vt?lyrs=m@205248939&amp;src=apiv3&amp;hl=pl&amp;x=139&amp;y=83&amp;z=8&amp;s=Gali&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 294px; top: 236px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt1.googleapis.com/vt?lyrs=m@205234273&amp;src=apiv3&amp;hl=pl&amp;x=139&amp;y=85&amp;z=8&amp;s=Galile&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: -218px; top: -20px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt1.googleapis.com/vt?lyrs=m@205235891&amp;src=apiv3&amp;hl=pl&amp;x=137&amp;y=84&amp;z=8&amp;s=Galileo&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 550px; top: -20px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt0.googleapis.com/vt?lyrs=m@205243931&amp;src=apiv3&amp;hl=pl&amp;x=140&amp;y=84&amp;z=8&amp;s=&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: -218px; top: -276px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt1.googleapis.com/vt?lyrs=m@205246961&amp;src=apiv3&amp;hl=pl&amp;x=137&amp;y=83&amp;z=8&amp;s=Galile&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: -218px; top: 236px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt1.googleapis.com/vt?lyrs=m@205243233&amp;src=apiv3&amp;hl=pl&amp;x=137&amp;y=85&amp;z=8&amp;s=&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 550px; top: -276px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt0.googleapis.com/vt?lyrs=m@205245469&amp;src=apiv3&amp;hl=pl&amp;x=140&amp;y=83&amp;z=8&amp;s=Galileo&amp;style=api%7Csmartmaps" draggable="false"></div><div style="width: 256px; height: 256px; position: absolute; left: 550px; top: 236px;"><img style="width: 256px; height: 256px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://mt0.googleapis.com/vt?lyrs=m@205246925&amp;src=apiv3&amp;hl=pl&amp;x=140&amp;y=85&amp;z=8&amp;s=G&amp;style=api%7Csmartmaps" draggable="false"></div></div></div></div></div><div style="margin: 2px 5px 2px 2px; z-index: 1000000; position: absolute; left: 0px; bottom: 0px;"><a style="position: static; overflow: visible; float: none; display: inline;" target="_blank" href="http://maps.google.com/maps?ll=51.94648,15.523244&amp;z=8&amp;t=m&amp;hl=pl" title="Kliknij, aby wyświetlić ten obszar w serwisie Mapy Google"><div style="width: 62px; height: 24px; cursor: pointer;"><img style="position: absolute; left: 0px; top: 0px; width: 62px; height: 24px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/google_white.png" draggable="false"></div></a></div><div class="gmnoprint" style="z-index: 1000001; position: absolute; right: 0px; bottom: 0px;"><div style="height: 19px; -moz-user-select: none; line-height: 19px; padding-right: 2px; padding-left: 50px; background: -moz-linear-gradient(left center , rgba(255, 255, 255, 0) 0px, rgba(255, 255, 255, 0.5) 50px) repeat scroll 0% 0% transparent; font-family: Arial,sans-serif; font-size: 10px; color: rgb(68, 68, 68); white-space: nowrap; direction: ltr; text-align: right;"><a style="color: rgb(68, 68, 68); text-decoration: underline; cursor: pointer; display: none;">Dane mapy</a><span>Dane do Mapy &copy;2013 GeoBasis-DE/BKG (&copy;2009), Google</span><span> - </span><a style="color: rgb(68, 68, 68); text-decoration: underline; cursor: pointer;" href="http://www.google.com/intl/pl_US/help/terms_maps.html" target="_blank">Warunki korzystania z programu</a></div></div><div style="background-color: white; padding: 15px 21px; border: 1px solid rgb(171, 171, 171); font-family: Arial,sans-serif; color: rgb(34, 34, 34); box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.2); z-index: 10000002; display: none; width: 256px; height: 148px; position: absolute; left: 154px; top: 49px;"><div style="padding: 0px 0px 10px; font-size: 16px;">Dane mapy</div><div style="font-size: 13px;">Dane do Mapy &copy;2013 GeoBasis-DE/BKG (&copy;2009), Google</div><div style="width: 10px; height: 10px; overflow: hidden; position: absolute; opacity: 0.7; right: 12px; top: 12px; z-index: 10000; cursor: pointer;"><img style="position: absolute; left: -18px; top: -44px; width: 68px; height: 67px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/mv/imgs8.png" draggable="false"></div></div><div class="gmnoscreen" style="position: absolute; right: 0px; bottom: 0px;"><div style="font-family: Arial,sans-serif; font-size: 10px; color: rgb(68, 68, 68); direction: ltr; text-align: right; background-color: rgb(245, 245, 245);">Dane do Mapy &copy;2013 GeoBasis-DE/BKG (&copy;2009), Google</div></div><div style="display: none; font-size: 10px; height: 17px; background-color: rgb(245, 245, 245); border: 1px solid rgb(220, 220, 220); line-height: 19px; position: absolute; right: 0px; bottom: 0px;" class="gmnoprint"><a target="_new" title="Zgłoś do Google błędy na mapie drogowej lub na zdjęciach." style="font-family: Arial,sans-serif; font-size: 85%; font-weight: bold; padding: 1px 3px; color: rgb(68, 68, 68); text-decoration: none; position: relative; bottom: 1px;" href="http://maps.google.com/maps?ll=51.94648,15.523244&amp;z=8&amp;t=m&amp;hl=pl&amp;skstate=action:mps_dialog$apiref:1">Zgłoś błąd w mapach</a></div><div class="gmnoprint" style="margin: 5px; -moz-user-select: none; position: absolute; left: 0px; top: 0px;" controlwidth="32" controlheight="84"><div style="cursor: url(&quot;http://maps.gstatic.com/mapfiles/openhand_8_8.cur&quot;), default; position: absolute; left: 0px; top: 0px;" controlwidth="32" controlheight="40"><div style="width: 32px; height: 40px; overflow: hidden; position: absolute; left: 0px; top: 0px;"><img style="position: absolute; left: -9px; top: -102px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 1029px; height: 255px;" src="http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/cb_scout_sprite_api_003.png" draggable="false"></div><div style="width: 32px; height: 40px; overflow: hidden; position: absolute; left: 0px; top: 0px; visibility: hidden;"><img style="position: absolute; left: -107px; top: -102px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 1029px; height: 255px;" src="http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/cb_scout_sprite_api_003.png" draggable="false"></div><div style="width: 32px; height: 40px; overflow: hidden; position: absolute; left: 0px; top: 0px; visibility: hidden;"><img style="position: absolute; left: -58px; top: -102px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 1029px; height: 255px;" src="http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/cb_scout_sprite_api_003.png" draggable="false"></div><div style="width: 32px; height: 40px; overflow: hidden; position: absolute; left: 0px; top: 0px; visibility: hidden;"><img style="position: absolute; left: -205px; top: -102px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 1029px; height: 255px;" src="http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/cb_scout_sprite_api_003.png" draggable="false"></div></div><div class="gmnoprint" style="opacity: 0.6; display: none; position: absolute;" controlwidth="0" controlheight="0"><img src="http://maps.gstatic.com/mapfiles/rotate2.png" draggable="false" style="-moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; cursor: pointer; width: 22px; height: 22px;" title="Obróć mapę o 90 stopni"></div><div class="gmnoprint" controlwidth="22" controlheight="39" style="position: absolute; left: 5px; top: 45px;"><img style="width: 22px; height: 39px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="http://maps.gstatic.com/mapfiles/szc4.png" draggable="false"><div style="position: absolute; left: 0px; top: 0px; width: 22px; height: 17px; cursor: pointer;" title="Powiększ"></div><div style="position: absolute; left: 0px; top: 18px; width: 22px; height: 17px; cursor: pointer;" title="Pomniejsz"></div></div></div><div class="gmnoprint" style="margin: 5px; z-index: 0; position: absolute; cursor: pointer; right: 0px; top: 0px;"><div style="float: left;"><div style="direction: ltr; overflow: hidden; text-align: center; position: relative; color: rgb(0, 0, 0); font-family: Arial,sans-serif; -moz-user-select: none; font-size: 13px; background: none repeat scroll 0% 0% rgb(255, 255, 255); padding: 1px 6px; border: 1px solid rgb(113, 123, 135); box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4); font-weight: bold; min-width: 37px;" title="Pokaż mapę ulic">Mapa</div><div style="background-color: white; z-index: -1; padding-top: 2px; border-width: 0px 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(113, 123, 135) rgb(113, 123, 135); -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4); position: absolute; left: 0px; top: 24px; text-align: left; display: none;"><div style="color: rgb(0, 0, 0); font-family: Arial,sans-serif; -moz-user-select: none; font-size: 11px; background-color: rgb(255, 255, 255); padding: 1px 8px 3px 5px; direction: ltr; text-align: left; white-space: nowrap;" title="Pokaż mapę ulic z terenem"><span role="checkbox" style="position: relative; line-height: 0; font-size: 0px; margin: 0px 5px 0px 0px; display: inline-block; background-color: rgb(255, 255, 255); border: 1px solid rgb(198, 198, 198); border-radius: 1px 1px 1px 1px; width: 13px; height: 13px; box-shadow: none; vertical-align: middle;"><div style="position: absolute; left: 1px; top: -2px; width: 13px; height: 11px; overflow: hidden; display: none;"><img style="position: absolute; left: -52px; top: -44px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 68px; height: 67px;" src="http://maps.gstatic.com/mapfiles/mv/imgs8.png" draggable="false"></div></span><label style="vertical-align: middle; cursor: pointer;">Teren</label></div></div></div><div style="float: left;"><div style="direction: ltr; overflow: hidden; text-align: center; position: relative; color: rgb(51, 51, 51); font-family: Arial,sans-serif; -moz-user-select: none; font-size: 13px; background: none repeat scroll 0% 0% rgb(255, 255, 255); padding: 1px 6px; border-width: 1px 1px 1px 0px; border-style: solid solid solid none; border-color: rgb(113, 123, 135) rgb(113, 123, 135) rgb(113, 123, 135) -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4); font-weight: normal; min-width: 50px;" title="Pokaż zdjęcia satelitarne">Satelita</div><div style="background-color: white; z-index: -1; padding-top: 2px; border-width: 0px 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(113, 123, 135) rgb(113, 123, 135); -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4); position: absolute; right: 0px; top: 24px; text-align: left; display: none;"><div style="color: rgb(184, 184, 184); font-family: Arial,sans-serif; -moz-user-select: none; font-size: 11px; background-color: rgb(255, 255, 255); padding: 1px 8px 3px 5px; direction: ltr; text-align: left; white-space: nowrap; display: none;" title="Powiększ, aby wyświetlić widok pod kątem 45 stopni"><span role="checkbox" style="position: relative; line-height: 0; font-size: 0px; margin: 0px 5px 0px 0px; display: inline-block; background-color: rgb(255, 255, 255); border: 1px solid rgb(241, 241, 241); border-radius: 1px 1px 1px 1px; width: 13px; height: 13px; box-shadow: none; vertical-align: middle;"><div style="position: absolute; left: 1px; top: -2px; width: 13px; height: 11px; overflow: hidden; display: none;"><img style="position: absolute; left: -52px; top: -44px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 68px; height: 67px;" src="http://maps.gstatic.com/mapfiles/mv/imgs8.png" draggable="false"></div></span><label style="vertical-align: middle; cursor: pointer;">45°</label></div><div style="color: rgb(0, 0, 0); font-family: Arial,sans-serif; -moz-user-select: none; font-size: 11px; background-color: rgb(255, 255, 255); padding: 1px 8px 3px 5px; direction: ltr; text-align: left; white-space: nowrap;" title="Pokaż zdjęcia z nazwami ulic"><span role="checkbox" style="position: relative; line-height: 0; font-size: 0px; margin: 0px 5px 0px 0px; display: inline-block; background-color: rgb(255, 255, 255); border: 1px solid rgb(198, 198, 198); border-radius: 1px 1px 1px 1px; width: 13px; height: 13px; box-shadow: none; vertical-align: middle;"><div style="position: absolute; left: 1px; top: -2px; width: 13px; height: 11px; overflow: hidden;"><img style="position: absolute; left: -52px; top: -44px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px; width: 68px; height: 67px;" src="http://maps.gstatic.com/mapfiles/mv/imgs8.png" draggable="false"></div></span><label style="vertical-align: middle; cursor: pointer;">Etykiety</label></div></div></div></div></div></div>
            </div>
            <div class="cls"></div>

            <div id="kontakt_form" class="form">

                <form method="POST" action="" id="formkontakt">
                    <div class="k_t">
                        <div class="fl">
                            <span>Imię<span class="required">*</span></span>
                        </div>
                        <div class="fl">
                            <span>E-mail<span class="required">*</span></span>
                        </div>
                        <div class="fl">
                            <span>Telefon<span class="required">*</span></span>
                        </div>
                        <div class="cls"></div>
                    </div>
                    <div class="k_t">
                        <div class="fl">
                            <input type="text" name="imie">
                        </div>
                        <div class="fl">
                            <input type="text" name="email">
                        </div>
                        <div class="fl">
                            <input type="text" name="telefon">
                        </div>
                        <div class="cls"></div>
                    </div>
                    <div style="margin-left: 10px; padding-top: 15px">
                        <p>Wiadomość<span class="required">*</span></p>
                        <textarea name="tresc" cols="57" rows="12"></textarea><br>
                        <div style="text-align: right;width:486px; padding: 6px 0 20px">
                            <input id="send_form" type="submit" value="Wyślij" class="buttonSend">
                        </div>
                    </div>
                    <input type="hidden" value=" " name="sendMail">
                </form>
            </div>

            <div class="cls"></div>
        </div>
        <div >

        </div>
    </div>
</div>
<script type="text/javascript">
    $('#send_form')
    .click(function(ev){
        ev.preventDefault();
        var valid = true;
        var msg = '';
        
        if($('input[name="imie"]').val().toString().length<2){
            msg += "Wpisz imię \r\n";
            valid = false;            
        }
        if($('input[name="email"]').val().toString().length<2){
            msg += "Wpisz E-mail \r\n";
            valid = false;            
        }
        if($('input[name="telefon"]').val().toString().length<2){
            msg += "Wpisz telefon \r\n";
            valid = false;            
        }
        if($('textarea[name="tresc"]').val().toString().length<2){
            msg += "Wpisz treść \r\n";
            valid = false;            
        }
        
        if(!valid){
            alert(msg);
            return false;
        }
        $('#formkontakt').submit()
    });
</script>